<?php

namespace App\Services\SearchTeamMember;

use App\Models\User;

class SearchTeamMember
{
	protected $user;
	
	protected $keyword = '';
	
	public function __construct(User $user, $scope, $keyword)
	{
		$this->user = $user;
		$this->scope = $scope;
		$this->keyword = $keyword;
	}
	
	public function search()
	{
		return $this->user->myDownOneChildren($this->scope, $this->keyword)->paginate();
	}
}
